package pe.edu.upc.dsd.esb.whereeat.component;

import java.io.IOException;
import java.util.Properties;

import org.mule.api.MuleContext;
import org.mule.api.context.MuleContextAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.PropertiesFactoryBean;

public class AbstractComponent implements MuleContextAware {

	@Autowired
	private PropertiesFactoryBean propertiesFactoryBean;
	protected MuleContext context;
	protected Properties properties;

	public void setMuleContext(MuleContext context) {
		this.context = context;
		try {
			properties = propertiesFactoryBean.getObject();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
